<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/** Customer or user class
 *
 * This is customer class to generate the main page for login and registration
 *
 * @author  Zoms
 * @version 39
 * @copyright copyright (c) 2011, Boston Univeristy Under BSD
 * @todo add function to retrive password
 * @todo add function to update profile
 */
class Yogette extends CI_Controller {

    /**
     * Index Page for this controller.
     *
     * Maps to the following URL
     * 		http://example.com/index.php/welcome
     * 	- or -  
     * 		http://example.com/index.php/welcome/index
     * 	- or -
     * Since this controller is set as the default controller in 
     * config/routes.php, it's displayed at http://example.com/
     *
     * So any other public methods not prefixed with an underscore will
     * map to /index.php/welcome/<method_name>
     * @see http://codeigniter.com/user_guide/general/urls.html
     */
    function __construct() {
        parent::__construct();
    }

    function index() {
    
        //calling the main function
        $this->main();
    }

    /** Main function
     *
     *  This function is the main function in this class and will wait for users input from yogette_view website   
     */
    function main() {
        
        $this->load->view('view_yogette');
    }
    
    
    function products(){
    
        $this->load->view('products');
    }
    
    function specials(){
    
        //$this->load->view('view_specials');
        redirect('menu/get_specials');
    }
    
     function toppings(){
    
       // $this->load->view('view_toppings');
         redirect('menu/view_toppings');
    }
    
    function logout()
	{
		/* to destroy the seesion and logout*/
		$this->session->sess_destroy();
                redirect('/yogette');
	}
}